docs(modules): lead with root placement for module manifests#80
docs(modules): lead with root placement for module manifests#80
Conversation
Restructure module docs to teach root placement (module.yaml and module-help.csv at the module root, alongside skill folders) as the default layout. The setup skill and self-registering single-skill layouts are now framed as alternatives for direct-download distribution rather than the primary patterns. Adds a "Skills Must Be Self-Runnable" principle to skill authoring best practices: registration manifests are metadata, not runtime dependencies, so every skill must work whether installed via the BMad installer or copied directly into a project.
WalkthroughDocumentation across five files is reframed from "setup skill vs standalone" to "module registration layouts," establishing root placement of Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/how-to/distribute-your-module.md`:
- Around line 77-100: The diagram contradicts the “module root” rule by showing
module.yaml and module-help.csv under skills/; update the example tree and
surrounding text so module.yaml and module-help.csv are placed at the actual
module root (next to .claude-plugin/marketplace.json), and make the manifest
example (e.g., source: "./") consistent with that layout; specifically revise
the ASCII tree to show module.yaml and module-help.csv at my-module/ (not inside
skills/), and adjust any explanatory lines that reference “module root” to match
this placement.
In `@docs/reference/builder-commands.md`:
- Around line 323-324: Update the "Create Module" capability summary row (label
"Create Module" / "CM") to correct the manifest location wording: replace the
claim that marketplace.json is generated "at the module root" with the accurate
path (for example ".claude-plugin/marketplace.json") or clarify that it is
placed under the .claude-plugin directory (or bundled into a skill for
direct-download distribution), so the row consistently references module.yaml,
module-help.csv, and the .claude-plugin/marketplace.json location.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ea26c64a-3ff9-41ac-9b27-f5a609c05b1e
📒 Files selected for processing (6)
docs/explanation/module-configuration.mddocs/explanation/skill-authoring-best-practices.mddocs/explanation/what-are-modules.mddocs/how-to/distribute-your-module.mddocs/reference/builder-commands.mddocs/tutorials/build-your-first-module.md
| Organize the repository so skills can be located relative to `marketplace.json`. The recommended layout places `module.yaml` and `module-help.csv` at the **module root**, alongside the skill folders. This is how the official BMad modules ship today. | ||
|
|
||
| ### Single-module repository | ||
| ### Single-module repository (recommended) | ||
|
|
||
| ``` | ||
| my-module/ | ||
| ├── .claude-plugin/ | ||
| │ └── marketplace.json | ||
| ├── skills/ | ||
| │ ├── module.yaml # Registration manifests at module root | ||
| │ ├── module-help.csv | ||
| │ ├── my-agent/ | ||
| │ │ ├── SKILL.md | ||
| │ │ ├── prompts/ | ||
| │ │ └── scripts/ | ||
| │ └── my-workflow/ | ||
| │ ├── SKILL.md | ||
| │ └── prompts/ | ||
| ├── README.md | ||
| └── LICENSE | ||
| ``` | ||
|
|
||
| In this layout, the BMad installer reads `module.yaml` and `module-help.csv` directly from the module root. No setup skill is needed; the installer handles agent registration, help registration, and any cross-project config from these two files. | ||
|
|
There was a problem hiding this comment.
Layout example conflicts with your own “module root” rule.
Lines 77 and 99 define root placement, but the diagram puts module.yaml/module-help.csv under skills/. That conflicts with the manifest example (source: "./") and can lead to incorrect repository structure.
Suggested doc fix (single-module recommended tree)
my-module/
├── .claude-plugin/
│ └── marketplace.json
-├── skills/
-│ ├── module.yaml # Registration manifests at module root
-│ ├── module-help.csv
-│ ├── my-agent/
-│ │ ├── SKILL.md
-│ │ ├── prompts/
-│ │ └── scripts/
-│ └── my-workflow/
-│ ├── SKILL.md
-│ └── prompts/
+├── module.yaml # Registration manifests at module root
+├── module-help.csv
+├── my-agent/
+│ ├── SKILL.md
+│ ├── prompts/
+│ └── scripts/
+├── my-workflow/
+│ ├── SKILL.md
+│ └── prompts/
├── README.md
└── LICENSEBased on learnings: "Applies to */module.yaml : Module metadata must be defined in module.yaml at the root of the module with installation config and variables".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/how-to/distribute-your-module.md` around lines 77 - 100, The diagram
contradicts the “module root” rule by showing module.yaml and module-help.csv
under skills/; update the example tree and surrounding text so module.yaml and
module-help.csv are placed at the actual module root (next to
.claude-plugin/marketplace.json), and make the manifest example (e.g., source:
"./") consistent with that layout; specifically revise the ASCII tree to show
module.yaml and module-help.csv at my-module/ (not inside skills/), and adjust
any explanatory lines that reference “module root” to match this placement.
| | **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `marketplace.json` at the module root (or bundled into a skill for direct-download distribution) | | ||
| | **Validate Module** | VM | Check structural integrity and entry quality | |
There was a problem hiding this comment.
Fix manifest location wording in capability summary.
Line 323 says marketplace.json is generated at the module root, but this file later documents .claude-plugin/marketplace.json. Align this row to avoid incorrect file placement guidance.
Suggested doc fix
-| **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `marketplace.json` at the module root (or bundled into a skill for direct-download distribution) |
+| **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `.claude-plugin/marketplace.json` (or bundle manifests into a skill for direct-download distribution) |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `marketplace.json` at the module root (or bundled into a skill for direct-download distribution) | | |
| | **Validate Module** | VM | Check structural integrity and entry quality | | |
| | **Create Module** | CM | Generate `module.yaml`, `module-help.csv`, and `.claude-plugin/marketplace.json` (or bundle manifests into a skill for direct-download distribution) | | |
| | **Validate Module** | VM | Check structural integrity and entry quality | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/reference/builder-commands.md` around lines 323 - 324, Update the
"Create Module" capability summary row (label "Create Module" / "CM") to correct
the manifest location wording: replace the claim that marketplace.json is
generated "at the module root" with the accurate path (for example
".claude-plugin/marketplace.json") or clarify that it is placed under the
.claude-plugin directory (or bundled into a skill for direct-download
distribution), so the row consistently references module.yaml, module-help.csv,
and the .claude-plugin/marketplace.json location.
🤖 Augment PR SummarySummary: Updates the module documentation to treat “root placement” of module registration manifests as the default, with setup-skill and self-registering layouts as direct-download alternatives. Changes:
Technical notes: Emphasizes manifests as installer/ 🤖 Was this summary useful? React with 👍 or 👎 |
| ## Configuration Files | ||
|
|
||
| Setup skills write to three files in `{project-root}/_bmad/`: | ||
| Module registration writes to three files in `{project-root}/_bmad/`: |
There was a problem hiding this comment.
docs/explanation/module-configuration.md:55 — This page mentions _bmad/config.toml / config.user.toml earlier, but here it documents config.yaml / config.user.yaml as the registration outputs. Consider making the file format/extension consistent across the page so users don’t write config to the wrong filenames.
Severity: medium
⏳ Generating Fix in Augment link...
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| 6. Writes the manifests and distribution scaffolding | ||
|
|
||
| **Multi-skill output:** A dedicated `{code}-setup/` folder with merge scripts, cleanup scripts, and a generic SKILL.md. | ||
| **Default output (root placement):** `module.yaml` and `module-help.csv` at the module root, plus `.claude-plugin/marketplace.json`. The BMad installer reads these directly. No setup skill or merge scripts are generated. |
There was a problem hiding this comment.
docs/reference/builder-commands.md:370 — This says Create Module’s default output is root module.yaml/module-help.csv with no setup skill/merge scripts, and VM auto-detects that layout, but the current Module Builder assets/scripts in this repo still scaffold/validate the *-setup/assets/ (or standalone assets/) layouts. If the tooling behavior hasn’t changed yet, these docs may mislead users about what CM/VM will generate/accept.
Severity: medium
Other Locations
docs/explanation/module-configuration.md:6docs/explanation/module-configuration.md:183docs/tutorials/build-your-first-module.md:84docs/tutorials/build-your-first-module.md:147docs/explanation/what-are-modules.md:143
⏳ Generating Fix in Augment link...
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| ## Step 2: Structure Your Repository | ||
|
|
||
| Organize the repository so skills can be located relative to `marketplace.json`. | ||
| Organize the repository so skills can be located relative to `marketplace.json`. The recommended layout places `module.yaml` and `module-help.csv` at the **module root**, alongside the skill folders. This is how the official BMad modules ship today. |
There was a problem hiding this comment.
docs/how-to/distribute-your-module.md:77 — The text calls for manifests at the “module root”, but the single-module example places module.yaml/module-help.csv under skills/ while the manifest example uses plugins[].source: "./". Consider clarifying which directory is treated as the module root by the installer so readers don’t end up with a valid marketplace manifest but manifests in an unexpected location.
Severity: low
⏳ Generating Fix in Augment link...
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Summary
module.yamlandmodule-help.csvat the module root, alongside skill folders) as the default layout, matching how the official BMad modules ship today and what the BMad installer prefers.skill-authoring-best-practices.md: registration manifests are metadata, not runtime dependencies, so every skill must work whether installed via the BMad installer or copied directly into a project.Files updated:
docs/explanation/skill-authoring-best-practices.md(new principle)docs/explanation/what-are-modules.md(root-first structure + alternatives table)docs/explanation/module-configuration.md(three-layout table, retitled)docs/how-to/distribute-your-module.md(root layout first, alternatives second)docs/tutorials/build-your-first-module.md(root layout first)docs/reference/builder-commands.md(Create Module / Validate Module updates)Test plan
#skills-must-be-self-runnableanchor)bmmandcistodaySummary by CodeRabbit